commonlibsse_ng\re\p\PlayerCharacter/
crime.rs

1use core::ptr::NonNull;
2
3use crate::re::BSTArray::BSTArray;
4use crate::re::BSTHashMap::BSTHashMap;
5use crate::re::TESFaction;
6use crate::re::TESObjectCELL::TESObjectCELL;
7use crate::re::TESObjectREFR::TESObjectREFR;
8use crate::re::TESWorldSpace::TESWorldSpace;
9
10#[repr(C)]
11#[derive(Debug, Default, Clone, PartialEq)]
12pub struct CrimeGoldStruct {
13    violentCur: f32,       // 00
14    nonViolentCur: f32,    // 04
15    nonViolentInfamy: f32, // 08
16    violentInfamy: f32,    // 0C
17}
18const _: () = {
19    assert!(core::mem::offset_of!(CrimeGoldStruct, violentCur) == 0x0);
20    assert!(core::mem::offset_of!(CrimeGoldStruct, nonViolentCur) == 0x4);
21    assert!(core::mem::offset_of!(CrimeGoldStruct, nonViolentInfamy) == 0x8);
22    assert!(core::mem::offset_of!(CrimeGoldStruct, violentInfamy) == 0xc);
23    assert!(core::mem::size_of::<CrimeGoldStruct>() == 0x10);
24};
25
26#[repr(C)]
27#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
28pub struct StolenItemValueStruct {
29    unwitnessed: i32, // 0
30    witnessed: i32,   // 4
31}
32const _: () = {
33    assert!(core::mem::offset_of!(StolenItemValueStruct, unwitnessed) == 0x0);
34    assert!(core::mem::offset_of!(StolenItemValueStruct, witnessed) == 0x4);
35    assert!(core::mem::size_of::<StolenItemValueStruct>() == 0x8);
36};
37
38#[repr(C)]
39#[derive(Debug)]
40pub struct TeleportPath {
41    unk00: BSTArray<Unk00Data>, // 0x00
42    unk18: BSTArray<Unk18Data>, // 0x18
43    unk30: u64,                 // 0x30
44    unk38: u64,                 // 0x38
45    unk40: u64,                 // 0x40
46}
47const _: () = assert!(core::mem::size_of::<TeleportPath>() == 0x48);
48
49#[repr(C)]
50#[derive(Debug)]
51pub struct Unk00Data {
52    unk00: bool,    // 0x00 - Determines whether to use worldspace or cell?
53    pad01: [u8; 7], // 0x01
54    worldspace: Option<NonNull<TESWorldSpace>>, // 0x08
55    interiorCell: Option<NonNull<TESObjectCELL>>, // 0x10
56}
57const _: () = assert!(core::mem::size_of::<Unk00Data>() == 0x18);
58
59#[repr(C)]
60#[derive(Debug)]
61pub struct Unk18Data {
62    unk00: Option<NonNull<TESObjectREFR>>, // 0x00
63    unk08: u64,                            // 0x08
64    unk10: u64,                            // 0x10
65}
66const _: () = assert!(core::mem::size_of::<Unk18Data>() == 0x18);
67
68#[repr(C)]
69#[derive(Debug)]
70pub struct CrimeValue {
71    pub crimeGoldMap: BSTHashMap<*const TESFaction, CrimeGoldStruct>,
72    pub stolenItemValueMap: BSTHashMap<*const TESFaction, StolenItemValueStruct>,
73}